//
//  ViewController1.m

#import "ViewController1.h"
#import "NextViewController_1.h"
@interface ViewController1 ()

@end

@implementation ViewController1

- (void)viewDidLoad {
    [super viewDidLoad];
    self.navLab.text = @"第一页";
    self.view.backgroundColor = [UIColor yellowColor];
    
    UIButton *btn = [[UIButton alloc]initWithFrame:CGRectMake(0, 0, 64, 64)];
    btn.backgroundColor = [UIColor redColor];
    [btn addTarget:self action:@selector(nextAction) forControlEvents:UIControlEventTouchUpInside];
    [btn setTitle:@"下一页" forState:UIControlStateNormal];
    [self.view addSubview:btn];
    btn.center = CGPointMake(self.view.frame.size.width/2, self.view.frame.size.height/2);
}

-(void)nextAction{
    NextViewController_1 *vc = [[NextViewController_1 alloc]init];
    [self pushWithNextViewController:vc];
    
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
